﻿CREATE TABLE [dbo].[Transformation]
(
	[TransformationId] SMALLINT NOT NULL PRIMARY KEY, 
	[TransformationTypeId] SMALLINT NOT NULL DEFAULT -1 ,
	[TransformationCode] NCHAR(2) NOT NULL, 
	[TransformationShortName] NVARCHAR(20) NOT NULL , 
    [TransformationLongName] NVARCHAR(50) NOT NULL , 
    [SortOrder] SMALLINT NOT NULL, 
    CONSTRAINT [FK_Transformation_TransformationType] FOREIGN KEY ([TransformationTypeId]) REFERENCES [dbo].[TransformationType]([TransformationTypeId])   
)

GO

CREATE UNIQUE INDEX [IX_Transformation_TransformationCode] ON [dbo].[Transformation] ([TransformationCode])
